
namespace InfoTech.LanTranh.MucVu.Bussiness
{
    public partial class HOGIADINH
    {
        
        public override bool Equals(object obj)
        {
            HOGIADINH hogiadinh = obj as HOGIADINH;
            if (hogiadinh == null) return false;
            return MAHOGIADINH.Equals(hogiadinh.MAHOGIADINH);
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
        
        public string GetMaHoGiaDinh()
        {
            string result = HOGIADINHID.HasValue ? HOGIADINHID.Value.ToString("00000") : "";
            if (PRT_GIAOHO.IsPersistence)
                return string.Format("{0}.{1}", PRT_GIAOHO.MAHOID, result);
            return result;
        }

    }
}
